import request from '/@/utils/request';

// 查询推广员分组列表
export function listGroup(query?: Object) {
  return request({
    url: '/module/group/list',
    method: 'get',
    params: query
  })
}

// 查询推广员分组详细
export function getGroup(id?: number) {
  return request({
    url: '/module/group/' + id,
    method: 'get'
  })
}

// 新增推广员分组
export function addGroup(data?: Object) {
  return request({
    url: '/module/group',
    method: 'post',
    data: data
  })
}

// 修改推广员分组
export function updateGroup(data?: Object) {
  return request({
    url: '/module/group',
    method: 'put',
    data: data
  })
}

// 删除推广员分组
export function delGroup(id?: number) {
  return request({
    url: '/module/group/' + id,
    method: 'delete'
  })
}

// 导出推广员分组
export function exportGroup(query?: Object) {
  return request({
    url: '/module/group/export',
    method: 'get',
    params: query
  })
}
